package com.paranoidmonkey.ode;

import java.nio.Buffer;

public class TriMeshData extends ODEObject{
	public TriMeshData(){
		handle=AndrODE.dGeomTriMeshDataCreate();
	}

	protected TriMeshData(long id){
		handle=id;
	}
	
	public void destroy(){
		AndrODE.dGeomTriMeshDataDestroy(handle);
	}

	public void set( int data_id, Buffer in_data){
		AndrODE.dGeomTriMeshDataSet(handle, data_id, in_data);
	}

	public Buffer get( int data_id){
		return AndrODE.dGeomTriMeshDataGet(handle, data_id);
	}

	public void setLastTransform( float[] last_trans){
		AndrODE.dGeomTriMeshSetLastTransform(handle, last_trans);
	}

	public float[] getLastTransform(){
		return AndrODE.dGeomTriMeshGetLastTransform(handle);
	}

	public void buildSingle( float[] Vertices, int VertexStride, int VertexCount, int[] Indices, int IndexCount, int TriStride){
		AndrODE.dGeomTriMeshDataBuildSingle(handle, Vertices, VertexStride, VertexCount, Indices, IndexCount, TriStride);
	}

	public void buildSingle1( float[] Vertices, int VertexStride, int VertexCount, int[] Indices, int IndexCount, int TriStride, float[] Normals){
		AndrODE.dGeomTriMeshDataBuildSingle1(handle, Vertices, VertexStride, VertexCount, Indices, IndexCount, TriStride, Normals);
	}

	public void buildDouble( double[] Vertices, int VertexStride, int VertexCount, int[] Indices, int IndexCount, int TriStride){
		AndrODE.dGeomTriMeshDataBuildDouble(handle, Vertices, VertexStride, VertexCount, Indices, IndexCount, TriStride);
	}

	public void buildDouble1( double[] Vertices, int VertexStride, int VertexCount, int[] Indices, int IndexCount, int TriStride, double[] Normals){
		AndrODE.dGeomTriMeshDataBuildDouble1(handle, Vertices, VertexStride, VertexCount, Indices, IndexCount, TriStride, Normals);
	}

	public void buildSimple( float[] Vertices, int VertexCount, int[] Indices, int IndexCount){
		AndrODE.dGeomTriMeshDataBuildSimple(handle, Vertices, VertexCount, Indices, IndexCount);
	}

	public void buildSimple1( float[] Vertices, int VertexCount, int[] Indices, int IndexCount, int[] Normals){
		AndrODE.dGeomTriMeshDataBuildSimple1(handle, Vertices, VertexCount, Indices, IndexCount, Normals);
	}

	public void preprocess(){
		AndrODE.dGeomTriMeshDataPreprocess(handle);
	}

	public void getBuffer( byte[] buf, int[] bufLen){
		AndrODE.dGeomTriMeshDataGetBuffer(handle, buf, bufLen);
	}

	public void setBuffer( byte[] buf){
		AndrODE.dGeomTriMeshDataSetBuffer(handle, buf);
	}

}
